<template>

  <el-container>
    <div class="el-header">

      <img class="logo" src="../../assets/logo.jpeg" style=" border: 0px;" />
      <div class="list">
        <div class="p1">{{onepage.organization.address}}</div>
        <div class="p2">{{onepage.organization.en_name}}</div>
        <div class="p3">{{onepage.organization.name}}</div>
      </div>
    </div>

    <div class="blue-list">
    </div>

    <el-main>
      <el-row :gutter="20">

        <el-col :span="24">
          <div class="grid-content ">
            <div class="t1"> {{onepage.title}}</div>

            <div class="t2"> <span> {{onepage.cTime}}</span> <span>阅读次数：{{onepage.num}}次</span> </div>

            <div class="centent">
              {{onepage.context}}
            </div>

          </div>
        </el-col>

      </el-row>
    </el-main>
    <el-footer>

    </el-footer>

  </el-container>


</template>
<script>
  import {
    getOnePage,
    scanNum
  } from "@/api/user/user.js";
  export default {
    data() {
      let $domain = process.env.VUE_APP_BASE_API;
      return {
        onepage: {}
      };
    },
    created() {
      let id = this.$route.query.id
      console.log('id', id);
      this.requestuser(id)
    },
    methods: {
      query() {
        let _that = this;
        let data = {
          field: "tel",
          value: _that.searchName,
          op: "=",
        }
        getuser(data).then((res) => {
          _that.tableData = res.template_list
        })
      },
      handleSelectionChange(val) {
        this.multipleSelection = val
      },
      //请求页面第一个
      requestuser(id) {
        let _that = this;
        let data = {
          field: 'id',
          op: '=',
          value: id
        }
        getOnePage(data).then((res) => {
          console.log('请求成功：', res[0]);
          this.onepage = res[0]
          let d = {
            field: 'id',
            value: id,
            field1:'num'
          }
          scanNum(d).then(res=>{
            console.log('浏览增加');
          })
        })
      },
    },
  }
</script>

<style scoped>
  .el-row {
    margin-bottom: 20px;

    &:last-child {
      margin-bottom: 0;
    }
  }

  .el-col {
    border-radius: 4px;
  }

  .bg-purple-dark {
    background: #99a9bf;
  }

  .bg-purple {
    background: #d3dce6;
  }

  .bg-purple-light {
    background: #e5e9f2;
  }



  .row-bg {
    padding: 10px 0;
    background-color: #f9fafc;
  }

  .el-header {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-end;
    padding: 1rem;
    /* color: #333; */
    /* line-height: 60px; */
    width: 100%;
  }

  .p1 {
    font-size: 8px;
  }

  .p2 {
    font-size: 5px;
  }

  .p3 {
    font-size: 1rem;
  }

  .list {
    padding: 1rem;
  }

  .logo {
    height: 5rem;
    width: 5rem;
  }

  .grid-content {
    margin: auto;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 10px;
  }

  .t1{
    font-weight: 500;
  }
  .centent{
    text-indent: 36px;
    font-size: 15px;
    margin: auto;
  }
  .t2{
    display: flex;
    justify-content: space-around;
    align-content: space-around;
    color: #999;
    font-size: 10px;
    padding: 10px;
  }
  .blue-list {
    width: 150rem;
    height: 40px;
    background-color: #48A087;
  }
</style>
